vt-d: Use bitmap to solve domain-id limitation issue.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 5 Dec 2007 10:53:47 +0000 (10:53 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 5 Dec 2007 10:53:47 +0000 (10:53 +0000)
commit614f395bfd671d3a70479792121af87ad8bf3b07
tree2b632eefca4b1e5b6bacadfe11a4b05b7cc90902
parent2b795c6e3709bd1049fe7ecdd4b6e95ca8ab3dc7
vt-d: Use bitmap to solve domain-id limitation issue.

The Capability register reports the domain-id width supported by
hardware. For implementations supporting less than 16-bit domainids,
unused bits of domain identifier field(87:72) in Context entry are
treated as reserved by hardware. For example, for an implementation
supporting 4-bit domain-ids, bits 87:76 of this field are treated as
reserved. 16 is a small number, overflow is easy to happen. What's
more,
context-entries programmed with the same domain identifier must always
reference the same address translation structure (through the ASR
field). So Dom16 will conflict with Dom0, and device assignment fails.

This patch implements a domaid id bitmap to solve above issue.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/vmx/vtd/intel-iommu.c
xen/include/asm-x86/hvm/iommu.h
xen/include/asm-x86/hvm/vmx/intel-iommu.h